﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CameraFollow : MonoBehaviour
{
    //public Ball CurrentBall;


    public float _offset;

    public Transform Ball;
    /// <summary>
    /// 当主角碰到地面的一瞬间的位置
    /// </summary>
    public static Vector3 m_currentMomentBollPos;

    private void Update()
    {
        if ( Ball.position.y < m_currentMomentBollPos.y )
        {

            transform.position = new Vector3 ( 0 , Ball.position.y + _offset , -8f );
        }
        //if (CurrentBall.IsFly)
        //{
        //    transform.position = new Vector3(0, CurrentBall.gameObject.transform.position.y + _offset, -8f);
        //}
    }
}
